<?php
namespace app\hongyanche\controller;
class Wechat{
	public function jsapi()
	{
		return json(model('Wechat')->getSignPackage());
	}
	public function redirect(){
		$user = model('user');
		$user->wechatAutoLogin();
		if($user->logined()){
			header("Location:".str_replace("{XXXXX}","#",$_GET['url']));
			die();
		}
	}
}
